<script type="text/html" template lay-done="layui.data.done(d);">
    <div class="layui-table layui-form" lay-filter="LAY-app-WeChatMessageResponse-detailsForm" id="LAY-app-WeChatMessageResponse-detailsForm">
        {{ d.params.data.id || '' }}


        <div class="layui-bg-gray" style="padding: 5px;">
            <div class="layui-row layui-col-space15">
                <div class="layui-col-md12">
                    <div class="layui-card">
                        <div class="layui-card-header">发货状态</div>
                        <div class="layui-card-body">
                            {{# layui.each(d.params.data.status, function(index, item){ }}

                            {{# if(d.params.data.order.order_state==item.value) { }}

                            {{- item.description }}

                            {{# } }}

                            {{# }); }}
                        </div>
                    </div>
                </div>

            </div>
        </div>


        <div class="layui-bg-gray" style="padding: 5px;">
            <div class="layui-row layui-col-space15">
                <div class="layui-col-md12">
                    <div class="layui-card">
                        <div class="layui-card-header">发货状态</div>
                        <div class="layui-card-body">
                            商户号：{{d.params.data.order.merchant_id }}<br />
                            商户单号：{{d.params.data.order.merchant_trade_no }}<br />
                            交易单号：{{d.params.data.order.transaction_id }}<br />
                            支付金额：¥ {{d.params.data.order.paid_amount / 100 }} 元<br />
                            支付时间：{{ layui.util.toDateString(d.params.data.order.pay_time * 1000, 'yyyy-MM-dd HH:mm:ss')}}<br />
                        </div>
                    </div>
                </div>

            </div>
        </div>

        <div class="layui-bg-gray" style="padding: 5px;">
            <div class="layui-row layui-col-space15">
                <div class="layui-col-md12">
                    <div class="layui-card">
                        <div class="layui-card-header">
                            发货信息
                        </div>
                        <div class="layui-card-body">
                            商品信息：{{d.params.data.order.description }}<br />
                            发货方式：
                            {{# layui.each(d.params.data.logisticsType, function(index, item){ }}
                            {{d.params.data.order.shipping.logistics_type==item.value ? item.title:''}}
                            {{# }); }}
                            <br />


                            {{# if(d.params.data.order.shipping.logistics_type==1) { }}
                            {{#  layui.each(d.params.data.order.shipping.shipping_list, function(index, itemP){ }}
                            发货时间：{{ layui.util.toDateString(itemP.upload_time * 1000, 'yyyy-MM-dd HH:mm:ss')}}<br />
                            包裹{{index+1}}：

                            {{# layui.each(d.params.data.deliveryCompany, function(index, item){ }}

                            {{itemP.express_company==item.deliveryId ? item.deliveryName:''}}

                            {{# }); }}

                            {{itemP.tracking_no}}
                            <br />
                            {{#  }); }}

                            {{# }; }}


                        </div>
                    </div>
                </div>
            </div>
        </div>

    </div>
</script>
<script>
    var debug = layui.setter.debug;
    layui.data.done = function (d) {
        //开启调试情况下获取接口赋值数据
        if (debug) { console.log(d.params.data); }

        layui.use(['admin', 'form', 'coreHelper'], function () {
            var $ = layui.$
                , setter = layui.setter
                , admin = layui.admin
                , coreHelper = layui.coreHelper
                , form = layui.form;
            form.render(null, 'LAY-app-WeChatMessageResponse-detailsForm');
        });
    };
</script>